Genericity in Object-Oriented Programming Languages
نویسندگان
چکیده
Genericity is one of the most powerful means for obtaining flexibility in programming with statically typed programming languages. Genericity constructs take on very different forms, the choice of which has a considerable impact on expressiveness, modularity, static checkability and efficiency properties of programs. This tutorial presents an in-depth discussion of the history, origins, and structure of a wide range of genericity mechanisms, enabling the participant to better understand the rational behind various programming language designs and to utilize available mechanisms more efficiently. The tutorial is organized as follows: the general concept of genericity is introduced by means of examples, and an overall framework for understanding and classifying the variety of genericity mechanisms is presented. Hereafter the major programming languages and mechanisms are treated in context of this framework. These include C++ templates, Eiffel's parameterised classes, F-bounded polymorphism and BETA's virtual class patterns. Special attention will be given to the last 5 years' research in adding genericity to the Java Programming Language. We will use a small number of continuing examples to illustrate the strengths and weaknesses of the different approaches, and towards the end we present a large complex example of programming using genericity mechanisms.
منابع مشابه
Uniform Genericity for Aspect Languages
Aspect-oriented programming languages promise to provide better modularity than pure object-oriented decomposition. A typical benefit of increased modularity is ease of maintenance, evolution and reuse. However, it has been noted by various researchers that many of the first generation aspect languages do not provide the degree of reusability initially hoped for. In this paper, we argue that th...
متن کاملGenus: Making Generics Object-Oriented, Expressive, and Lightweight Technical Report
The support for generic programming in modern object-oriented programming languages is awkward and lacks desirable expressive power. We introduce an expressive genericity mechanism that adds expressive power and strengthens static checking, while remaining lightweight and simple in common use cases. Like type classes and concepts, the mechanism allows existing types to model type constraints re...
متن کاملSUAVE: Extending VHDL to Improve Support for Data Modeling*
Designers are increasingly using VHDL for high-level modeling. However, their task is hindered by the lack of object-oriented and genericity features in the language. Experience in programming languages shows that these features significantly aid management of complexity in large designs and promote re-use of modules. SUAVE extends VHDL by adapting several object-oriented and genericity feature...
متن کاملGenericity through Constrained Types
Modern object-oriented languages such as X10 require a rich framework for types capable of expressing valuedependency, type-dependency and supporting pluggable, application-specific extensions. In earlier work, we presented the framework of constrained types for concurrent, object-oriented languages, parametrized by an underlying constraint system C . Constraint systems are a very expressive fr...
متن کاملGeneric Ownership: Practical Alias Control in Object-Oriented Programming Languages
Modern object-oriented languages support many techniques that simplify the work of a programmer. Among them is type genericity — an ability to create generic descriptions of algorithms and object structures that will be automatically specialised by supplying type information at run time. On the other hand, object-oriented technologies still suffer from bad effects of aliasing— a case of many ob...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2001